/*
 * =====================================================================================
 *
 *       Filename:  test_regex.cpp
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  07/04/15 14:16:29
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Andy (gk), andy_y_li@163.com
 *        Company:  RD
 *
 * =====================================================================================
 */

#include "strRegex.h"

int main()
{
    const char *bematch = "hhhericchd@gmail.com";
    const char *pattern = "h{3,10}(.*)@.{5}.(.*)";

    StrPattern *p = new StrPattern(bematch, pattern);
    if (p->result() == OK) {
        for (int i = 0; i < p->matchCount(); i++) {
            printf("[%d]:%s\n", i, p->getMatchString(i));
        }
    }
    delete p;

    return 0;
}

